package com.crm.dao.mapper.customMapper.courseregist;

import com.crm.model.entity.courseregist.CourseRegistration;
import com.crm.model.qo.courseregist.AuditRegistListQO;
import com.crm.model.qo.courseregist.CourseRegistListQO;
import com.crm.model.vo.courseregist.AuditRegistListVO;
import com.crm.model.vo.courseregist.CourseRegistVO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface CourseRegistCustomMapper {


    /**
     * @Description: 根据主键删除数据
     * @Param: [id, deleteStatus]
     * @Return: Boolean
     * @Author: lixq-f
     * @Date: 2021/4/20
     **/
    Boolean deleteById(@Param("id") String id, @Param("deleteStatus") short deleteStatus);


    /**
     * @Description: 报名取消操作
     * @Param: [cancelPersonId-取消人id, cancelTm- 取消时间, id - 报名人id]
     * @Return: java.lang.Boolean
     * @Author: lixq-f
     * @Date: 2021/7/16
    **/
    Boolean registCancel(@Param("cancelPersonId") String cancelPersonId,
                         @Param("cancelTm") Date cancelTm,
                         @Param("id") String id);


    /**
     * @Description: 批量删除数据
     * @Param: [ids, deleteStatus]
     * @Return: Boolean
     * @Author: lixq-f
     * @Date: 2021/4/20
     **/
    Boolean batchDeleteByIds(@Param("ids") List<String> ids, @Param("deleteStatus") short deleteStatus);


    /**
     * @Description: 查询课程报名列表
     * @Param: [deleteStatus,registListQO]
     * @Return: java.util.List<com.crm.model.vo.courseregist.CourseRegistVO>
     * @Author: lixq-f
     * @Date: 2021/4/26
    **/
    List<CourseRegistVO> selectCourseRegistList(@Param("deleteStatus") short deleteStatus,
                                                @Param("order") String order,
                                                @Param("registListQO") CourseRegistListQO registListQO);



    /**
     * @Description: 插入数据
     * @Param: [registLst]
     * @Return: java.lang.Boolean
     * @Author: lixq-f
     * @Date: 2021/4/26
    **/
    Boolean batchInsert(@Param("registLst") List<CourseRegistration> registLst);



    /**
     * @Description: 根据报名ID获取报名信息
     * @Param: [id]
     * @Return: com.crm.model.vo.courseregist.CourseRegistVO
     * @Author: lixq-f
     * @Date: 2021/5/11
    **/
    CourseRegistVO selectCourseRegistById(@Param("id") String id);



    /**
     * @Description: 根据产品号更新报名状态为报名成功
     * @Param: [registLst]
     * @Return: java.lang.Boolean
     * @Author: lixq-f
     * @Date: 2021/6/11
     **/
    Integer consumeNoMember(@Param("registLst") List<String> registLst);


    /**
     * @Description: 根据报名ID修改报名状态、取消类型
     * @Param: [registLst]
     * @Return: java.lang.Boolean
     * @Author: lixq-f
     * @Date: 2021/6/11
     **/
    Integer updateRegistStatusByRegistIds(@Param("registLst") List<String> registLst,
                                          @Param("registStatus") int registStatus,
                                          @Param("cancelType") int cancelType,
                                          @Param("isConsume") int isConsume);



    /**
     * @Description: 审核报名列表
     * @Param: [order, registListQO]
     * @Return: java.util.List<com.crm.model.vo.courseregist.AuditRegistListVO>
     * @Author: lixq-f
     * @Date: 2021/7/15
     **/
    List<AuditRegistListVO> selectAuditRegistList(@Param("order") String order,
                                                  @Param("registListQO") AuditRegistListQO registListQO);
}
